<template>
  <div class="require_body_steps">
    <van-steps :active="active">
      <van-step>
        <template v-slot:inactive-icon>
          <div class="inactive">1</div>
        </template>
        <template v-slot:active-icon>
          <div class="activeicon">1</div>
        </template>
        <h3>科室选择</h3>
      </van-step>

      <van-step>
        <template v-slot:inactive-icon>
          <div class="inactive">2</div>
        </template>
        <template v-slot:active-icon>
          <div class="activeicon">2</div>
        </template>
        <h3>描述病情</h3>
      </van-step>
      <van-step>
        <template v-slot:inactive-icon>
          <div class="inactive">3</div>
        </template>
        <template v-slot:active-icon>
          <div class="activeicon">3</div>
        </template>
        <h3>医生沟通</h3>
      </van-step>
      <van-step>
        <template v-slot:inactive-icon>
          <div class="inactive">4</div>
        </template>
        <template v-slot:active-icon>
          <div class="activeicon">4</div>
        </template>
        <h3>获取药方</h3>
      </van-step>
    </van-steps>
  </div>
</template>

<script>
export default {
  name: "steps",
  props: {
    active: {
      required: true,
      type: Number,
      default() {
        return 0;
      },
    },
  },
};
</script>

<style lang="scss" scope>
.inactive {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1px solid #0052d9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0052d9;
  font-size: 18px;
}
.activeicon {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background-color: #0052d9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}
.require {
  &_body {
    &_steps {
      width: 100%;
      padding: 70px 30px 5px 30px;
      background-color: #fafafa;
      color: #fff;
      & .van-steps {
        background-color: #fafafa;
      }
      & .van-step--horizontal .van-step__circle-container {
        background-color: #fafafa;
      }
      & .van-step--horizontal .van-step__line {
        top: -0.6rem;
      }
      & .van-step--horizontal .van-step__circle-container {
        top: -0.6rem;
      }
      & .van-steps--horizontal {
        overflow: visible;
      }
      & .van-step--horizontal .van-step__title {
        font-size: 0.3rem;
      }
      & .van-step__title--active {
        color: #0052d9;
      }
      & .van-step--finish .van-step__circle,
      .van-step--finish .van-step__line {
        background-color: #0052d9;
      }
    }
  }
}
</style>
